package com.mzy.multithreading.basic;

import com.mzy.datepackage.M2022.May.twThree.main;

/**
 * Created with IntelliJ IDEA.
 *
 * @Author mzy
 * @Date 2022/7/28 7:24
 * @Version 1.0
 */
public class UserThread {
    /**
     * 用户线程： 自定义线程
     * 作用，主线程结束了，用户线程还在运行，jvm存活
     * @param args
     */
    public static void main(String[] args) {
        Thread aa = new Thread(() -> {
            System.out.println(Thread.currentThread().getName() + "::" + Thread.currentThread().isDaemon());
            while (true) {

            }
        }, "AA");
        aa.start();

        System.out.println(Thread.currentThread().getName()+ " over结束");
    }
}
